
import request from './request'

export function getCategoryList(params) {
  return request({
    url: '/api/category/list',
    method: 'get',
    params
  })
}

export function addCategory(data) {
  return request({
    url: '/api/category/add',
    method: 'post',
    data
  })
}

export function updateCategory(data) {
  return request({
    url: '/api/category/update',
    method: 'post',
    data
  })
}

export function deleteCategory(id) {
  return request({
    url: `/api/category/delete/${id}`,
    method: 'post'
  })
}
